# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pytest-black
pkgver=0.3.10
pkgrel=0
pkgdesc="A pytest plugin to enable format checking with black"
url="https://github.com/shopkeep/pytest-black"
arch="noarch !mips !mips64 !s390x" # Blocked by black
license="MIT"
depends="python3 py3-pytest black py3-toml"
makedepends="py3-setuptools py3-setuptools_scm"
source="https://pypi.python.org/packages/source/p/pytest-black/pytest-black-$pkgver.tar.gz"
builddir="$srcdir/pytest-black-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# Hack entry point by installing it
	python3 setup.py install --root="$PWD/tmp_install"
	PYTHONPATH="$PWD/tmp_install/usr/lib/python3.8/site-packages:$PYTHONPATH" pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="0c7e4fd88b65bfd5c5c755ac150e83f0befe1ca0921a7f06e919c9267119f262a9ef97cd6c0b4b0fcb11dd08da50967e48e24d1cd1d91312fe7644d880ed328e  pytest-black-0.3.10.tar.gz"
